package com.xiaofeng.pochi.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaofeng.pochi.common.Page;
import com.xiaofeng.pochi.pojo.ShopProductCategory;
import com.xiaofeng.pochi.pojo.SysBanner;
import com.xiaofeng.pochi.pojo.vo.CategoryBrandVo;
import com.xiaofeng.pochi.pojo.vo.ShopProductCategoryVo;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/08/08/22:50
 * @Description:
 */
public interface ShopProductCategoryService extends IService<ShopProductCategory> {

    /**
     * 添加
     * @param shopProductCategory
     */
    void saveShop(ShopProductCategory shopProductCategory);

    /**
     * 修改
     * @param shopProductCategory
     */
    void update(ShopProductCategory shopProductCategory);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    ShopProductCategory get(Long id);

    /**
     * 根据id删除
     * @param id
     * @return
     */
    void delete(Long id);

    /**
     * 分页查询
     * @param page
     * @return
     */
    Page<ShopProductCategory> getByPage(Page<ShopProductCategory> page);

    /**
     * 树形查询
     * */
    List<ShopProductCategoryVo> getTree();

    /**
     * 查询树形下拉框
     * */
    List<ShopProductCategoryVo> getSelectTree();

    List<ShopProductCategory> getAllSecond();

    /**
     * 查询首页分类
     * */
    List<ShopProductCategory> getNavList();

    /**
     * 根据分类ID查询同级的分类和品牌
     * @param categoryId
     * @return
     */
    CategoryBrandVo getCategoryAndBrandListById(Long categoryId);
}
